﻿using Pjax.Mvc5;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PjaxWeb.Controllers
{
    [Pjax.Mvc5.Pjax]
    public class HomeController : ControllerBase
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        //public ActionResult Logout()
        //{
        //    WebSecurity.Logout();

        //    this.PjaxFullLoad();

        //    return Redirect("~");
        //}
    }

    [PjaxAttribute]
    public class ControllerBase : Controller, IPjax
    {
        public bool IsPjaxRequest { get; set; }
        public string PjaxVersion { get; set; }
    }
}